package com.exchange.controller;

import com.exchange.service.ElectricCardService;
import com.exchange.until.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/jeecg-boot")
@RestController
@Tag(name = "电卡")
public class ElectricController {
    @Autowired
    private ElectricCardService electricCardService;

    @PostMapping("/electrics")
    @Operation(summary = "换电")
    public Result<String> electrics(@RequestHeader("token")String token){
        return electricCardService.electrics(token);
    }
}
